f36d48
@@ -130,11 +130,17 @@
public class ImportTsv {
           tabOffsets.add(i);
         }
       }
+      if (tabOffsets.isEmpty()) {
+        throw new BadTsvLineException("No delimiter");
+      }
+
       tabOffsets.add(length);
+
       if (tabOffsets.size() > families.length) {
-        throw new BadTsvLineException("Bad line:\n");
+        throw new BadTsvLineException("Excessive columns");
+      } else if (tabOffsets.size() <= getRowKeyColumnIndex()) {
+        throw new BadTsvLineException("No row key");
       }
-
       return new ParsedLine(tabOffsets, lineBytes);
     }
     
@@ -353,6 +359,12 @@
public class ImportTsv {
       System.exit(-1);
     }
 
+    // Make sure one or more columns are specified
+    if (columns.length < 2) {
+      usage("One or more columns in addition to the row key are required");
+      System.exit(-1);
+    }
+
     Job job = createSubmittableJob(conf, otherArgs);
     System.exit(job.waitForCompletion(true) ? 0 : 1);
   }
